job TestGcd(list inputs) {
  int extra = gcd(6, 28);
  @{"echo %d %d %d %d %d %d %d"
    % [(int)inputs[0], (int)inputs[1], (int)inputs[2],
  	   (int)inputs[3], (int)inputs[4], (int)inputs[5], extra]};
}

void main(list args) {
  list server = [["host"=>"localhost",
                  "user"=>"dummy",
                  "password"=>"dummypw"
                 ]];
  connect server;

  list inputs;
  inputs = inputs + [ gcd(102,34), gcd(122,42) ];
  inputs = inputs + [ gcd(32,13), gcd(11,3) ];

  int a = gcd(15, 20);
  int b = gcd(12, 16);
  inputs = inputs + [ a, b ];

	list nil;
  push TestGcd, null, [inputs], nil;
}

int gcd(int m, int n) {
  if ((m mod n) == 0)
    return n;
  else
    return gcd(n, m mod n);
}
